package com.lhsy.djcloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lhsy.djcloud.entity.Upload;
import com.lhsy.djcloud.mapper.UploadMapper;
import com.lhsy.djcloud.service.UploadService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzw
 * @since 2020-09-15
 */
@Service
public class UploadServiceImpl extends ServiceImpl<UploadMapper, Upload> implements UploadService {

    @Override
    public Upload getBySha1(String fileSHA1) {
        QueryWrapper<Upload> queryWrapper = new QueryWrapper<>();
        Upload account = new Upload();
        account.setSha1(fileSHA1);
        queryWrapper.setEntity(account);
        return getOne(queryWrapper);
    }
}
